﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Sunny.UI;

namespace project
{
    public partial class admin_ui : UIHeaderMainFrame
    {
    public static Action updateDataGridView;
        public admin_ui()
        {
            InitializeComponent();
            Header.TabControl = MainTabControl;

            //增加页面到Main
            AddPage(new ControlBook(), 1001);
            AddPage(new RentRecord(), 1002);
            AddPage(new AdminControl(), 1003);
            AddPage(new StudentControl(), 1004);

            //设置Header节点索引
            Header.SetNodePageIndex(Header.Nodes[0], 1001);
            Header.SetNodePageIndex(Header.Nodes[1], 1002);
            Header.SetNodePageIndex(Header.Nodes[2], 1003);
            Header.SetNodePageIndex(Header.Nodes[3], 1004);

            //显示默认界面
            Header.SelectedIndex = 0;


        }

        private void admin_ui_Load(object sender, EventArgs e)
        {
        }

        private void Header_MenuItemClick(string itemText, int menuIndex, int pageIndex)
        {

        }
    }
}
